<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta content="text/html;charset=UTF-8"/>
    <title>登录页面</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<link th:href="@{/css/bootstrap.min14ed.css}" rel="stylesheet">
	<link th:href="@{/css/font-awesome.min93e3.css}" rel="stylesheet">
	<link th:href="@{/css/animate.min.css}" rel="stylesheet">
	<link th:href="@{/css/style.min862f.css}" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="middle-box text-center loginscreen  animated fadeInDown">
	<div>
		<div>
			<h1 class="logo-name"></h1>
		</div>
		<h3>
			<p th:if="${param.logout}" class="bg-warning">已成功注销</p><!-- 1 -->
			<p th:if="${param.error}" th:text="${session.SPRING_SECURITY_LAST_EXCEPTION.message}=='Bad credentials'?'账号/密码错误！':${session.SPRING_SECURITY_LAST_EXCEPTION.message}" class="bg-danger"></p>
		</h3>
		<form class="m-t" th:action="@{/login}" action="/login" method="POST">
			<div class="form-group">
				<input type="text" name="username" id="username" class="form-control" placeholder="用户名" required="">
			</div>
			<div class="form-group">
				<input type="password" name="password" id="password" class="form-control" placeholder="密码" required="">
			</div>
			<button type="submit" class="btn btn-primary block full-width m-b">登 录</button>
			<!--
			<p class="text-muted text-center"> <a href="login.html#"><small>忘记密码了？</small></a> | <a href="register.html">注册一个新账号</a>
			</p>
			-->
		</form>
	</div>
</div>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script type="text/javascript">
	$(function(){
		var name = '[[${#authentication.name}]]';
		if(name!='anonymousUser'){
			window.location.href = "/main"
		}
	});
</script>
</body>
</html>